package acwing.discretization;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class subOfInterval {
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    public static void main(String[] args) throws IOException {
        String[] s1 = br.readLine().split(" ");
        int n = Integer.parseInt(s1[0]);
        int m = Integer.parseInt(s1[1]);
        while(n-- != 0 ){
            String[] s2 = br.readLine().split(" ");
            int x = Integer.parseInt(s2[0]);
            int c = Integer.parseInt(s2[1]);
        }
        while(m-- != 0 ){
            String[] s3 = br.readLine().split(" ");
            int l = Integer.parseInt(s3[0]);
            int r = Integer.parseInt(s3[1]);
        }
    }
}
